<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>count_sentences</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.1">
<link rel="home" href="index.html" title="Руководство по Smarty">
<link rel="up" href="language.modifiers.html" title="Chapter 5. Модификаторы переменных">
<link rel="prev" href="language.modifier.count.paragraphs.html" title="count_paragraphs">
<link rel="next" href="language.modifier.count.words.html" title="count_words">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr><th colspan="3" align="center">count_sentences</th></tr>
<tr>
<td width="20%" align="left">
<a accesskey="p" href="language.modifier.count.paragraphs.html">Prev</a> </td>
<th width="60%" align="center">Chapter 5. Модификаторы переменных</th>
<td width="20%" align="right"> <a accesskey="n" href="language.modifier.count.words.html">Next</a>
</td>
</tr>
</table>
<hr>
</div>
<div class="sect1" title="count_sentences">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
<a name="language.modifier.count.sentences"></a>count_sentences</h2></div></div></div>
<p>
 	Подсчитывает количество предложений в переменной.
	</p>
<div class="example">
<a name="id2654486"></a><p class="title"><b>Example 5.6. count_sentences</b></p>
<div class="example-contents">
<pre class="programlisting">

&lt;?php
    
$smarty-&gt;assign('articleTitle',
                 'Two Soviet Ships Collide - One Dies.
                 Enraged Cow Injures Farmer with Axe.'
                 );

?&gt;

   </pre>
<p>
    Шаблон:
   </p>
<pre class="programlisting">

{$articleTitle}
{$articleTitle|count_sentences}

   </pre>
<p>
    Результат обработки:
   </p>
<pre class="screen">

Two Soviet Ships Collide - One Dies. Enraged Cow Injures Farmer with Axe.
2

   </pre>
</div>
</div>
<br class="example-break"><p>
   См. также
   <a class="link" href="language.modifier.count.characters.html" title="count_characters">count_characters</a>,
   <a class="link" href="language.modifier.count.paragraphs.html" title="count_paragraphs">count_paragraphs</a>
   и
   <a class="link" href="language.modifier.count.words.html" title="count_words">count_words</a>.
  </p>
</div>
<div class="navfooter">
<hr>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left">
<a accesskey="p" href="language.modifier.count.paragraphs.html">Prev</a> </td>
<td width="20%" align="center"><a accesskey="u" href="language.modifiers.html">Up</a></td>
<td width="40%" align="right"> <a accesskey="n" href="language.modifier.count.words.html">Next</a>
</td>
</tr>
<tr>
<td width="40%" align="left" valign="top">count_paragraphs </td>
<td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td>
<td width="40%" align="right" valign="top"> count_words</td>
</tr>
</table>
</div>
</body>
</html>
